<!DOCTYPE html>
<html lang="Zh-CN">
    <head>
        <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>订单详情</title>
        <!-- plugins:css -->
        <link rel="stylesheet" href="/static/vendors/mdi/css/materialdesignicons.min.css">
        <link rel="stylesheet" href="/static/vendors/base/vendor.bundle.base.css">
        <!-- endinject -->
        <!-- plugin css for this page -->
        <link rel="stylesheet" href="/static/vendors/datatables.net-bs4/dataTables.bootstrap4.css">
        <!-- End plugin css for this page -->
        <!-- inject:css -->
        <link rel="stylesheet" href="/static/css/style.css">
        <!-- endinject -->
        <link rel="shortcut icon" href="/static/images/favicon.png" />
    </head>
    <body>
        <div class="container-scroller">
            <nav class="navbar col-lg-12 col-12 p-0 d-flex flex-row fixed-top">
                <div class="navbar-brand-wrapper d-flex justify-content-center">
                  <div class="navbar-brand-inner-wrapper d-flex justify-content-between align-items-center w-100">  
                    <a class="navbar-brand brand-logo" href="{% url 'login:index1' %}"><img src="/static/images/logo.svg" alt="logo"/></a>
                    <a class="navbar-brand brand-logo-mini" href="{% url 'login:index1' %}"><img src="/static/images/logo-mini.svg" alt="logo"/></a>
                    <button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
                      <span class="mdi mdi-sort-variant">
                      </span>
                    </button>
                  </div>  
                </div>
                <div class="navbar-menu-wrapper d-flex align-items-center justify-content-end">
                  <ul class="navbar-nav navbar-nav-right">
                    <li class="nav-item dropdown me-4">
                      <a class="nav-link count-indicator dropdown-toggle d-flex align-items-center justify-content-center notification-dropdown" id="notificationDropdown" href="#" data-bs-toggle="dropdown">
                        <i class="mdi mdi-bell mx-0"></i>
                        <span class="count"></span>
                      </a>
                      <div class="dropdown-menu dropdown-menu-right navbar-dropdown" 
                      aria-labelledby="notificationDropdown">
                        <p class="mb-0 font-weight-normal float-left dropdown-header">待办通知</p>
                        <a class="dropdown-item">
                          <div class="item-thumbnail">
                            <div class="item-icon bg-success">
                              <i class="mdi mdi-information mx-0"></i>
                            </div>
                          </div>
                          <div class="item-content">
                            <h6 class="font-weight-normal">未处理事务</h6>
                            <p class="font-weight-light small-text mb-0 text-muted">
                              您有未处理的订单
                            </p>
                          </div>
                        </a>
                      </div>
                    </li>
                    <li class="nav-item nav-profile dropdown">
                      <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" 
                      id="profileDropdown">
                        <img src="/static/images/faces/face-czw.jpg" alt="profile">
                        <span class="nav-profile-name">{{login_name}}</span>
                      </a>
                      <div class="dropdown-menu dropdown-menu-right navbar-dropdown" 
                      aria-labelledby="profileDropdown">
                        <a class="dropdown-item">
                          <i class="mdi mdi-settings text-primary"></i>
                          账户设置
                        </a>
                        <a class="dropdown-item">
                          <i class="mdi mdi-logout text-primary"></i>
                          下班！
                        </a>
                      </div>
                    </li>
                  </ul>
                  <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
                    <span class="mdi mdi-menu"></span>
                  </button>
                </div>
            </nav>
            <div class="container-fluid page-body-wrapper pt-0 proBanner-padding-top">
                <nav class="sidebar sidebar-offcanvas active" id="sidebar">
                    <ul class="nav">
                      <li class="nav-item">
                        <a class="nav-link" href="{% url 'sales:sale_index' %}">
                          <i class="mdi mdi-home menu-icon"></i>
                          <span class="menu-title">销售数据中台</span>
                        </a>
                      </li>
                      <li class="nav-item">
                        <a class="nav-link" href="{% url 'sales:sale_order' %}">
                          <i class="mdi mdi-circle-outline menu-icon"></i>
                          <span class="menu-title">开始处理订单</span>
                        </a>
                      </li>
                    </ul>
                </nav>
                <div class="main-panel">
                    <div class="content-wrapper">
                        <!--订单详情表单-->
                        <div class="col-md-12 grid-margin stretch-card">
                            <div class="card">
                              <div class="card-body">
                                <h1 class="card-title">订单详情</h1>
                                <p class="card-description">
                                  这是一个未处理订单
                                </p>
                                <form class="forms-sample" method="post" action="{% url 'sales:next_order' %}">
                                  {% csrf_token %}
                                  <div class="form-group row">
                                    <label for="exampleGetOrderNumber" class="col-sm-3 col-form-label">订单号</label>
                                    <div class="col-sm-9">
                                      <input type="text" class="form-control" name="order_id"
                                      id="exampleGetOrderNumber" placeholder="此处是订单号" readonly value="{{order.order_id}}">
                                    </div>
                                  </div>
                                  <div class="form-group row">
                                    <label for="exampleGetPurchaser" class="col-sm-3 col-form-label">购买人</label>
                                    <div class="col-sm-9">
                                      <input type="text" class="form-control"
                                      id="exampleGetPurchaser" placeholder="此处是脱敏后购买者的信息" readonly value="{{order.cid}}">
                                    </div>
                                  </div>
                                  <div class="form-group row">
                                    <label for="exampleGetStream" class="col-sm-3 col-form-label">下单直播</label>
                                    <div class="col-sm-9">
                                      <input type="text" class="form-control"
                                      id="exampleGetStream" placeholder="此处是脱敏后购买者购买商品的直播信息" readonly value="{{order.live_record.live_record_id}}">
                                    </div>
                                  </div>
                                  <div class="form-group row">
                                    <label for="exampleGetAddr" class="col-sm-3 col-form-label">收货地</label>
                                    <div class="col-sm-9">
                                      <input type="text" class="form-control"
                                      id="exampleGetAddr" placeholder="购买者收货地址所在地" readonly value="{{order.address}}">
                                    </div>
                                  </div>
                                  <div class="form-group row">
                                    <label for="exampleGetThing" class="col-sm-3 col-form-label">购买商品清单</label>
                                    <div class="col-sm-9">
                                      {% for good in goods %}
                                      <input type="text" class="form-control"
                                      id="exampleGetThing" placeholder="此处是脱敏后购买者所购买商品的代码" readonly
                                             value="{{good.goods.goods_id}} {{good.goods_num}}个">
                                      {% endfor %}
                                    </div>
                                  </div>
                                  <div class="form-group row">
                                    <label for="exampleGetTotalSum" class="col-sm-3 col-form-label">购物总额</label>
                                    <div class="col-sm-9">
                                      <input type="number" class="form-control" name="TotalSum"
                                      id="exampleGetTotalSum" placeholder="此处是购物的总额" readonly value="{{order.sum_price}}">
                                    </div>
                                  </div>
                                  <div class="form-check form-check-flat form-check-primary">
                                    <label class="form-check-label">
                                    <input type="checkbox" class="form-check-input" 
                                      id="OrderIsComfirmed" onclick="checkedOrNot(this);">
                                      订单已确认
                                    <i class="input-helper"></i>
                                    </label>
                                  </div>
                                  <input type="submit" class="btn btn-primary me-2"
                                  id="ConfirmBtn" disabled value="提交确认信息">
                                </form>
                              </div>
                            </div>
                        </div>
                    </div>
                    <footer class="footer">
                        <div class="d-sm-flex justify-content-center justify-content-sm-between">
                          <span class="text-muted text-center text-sm-left d-block d-sm-inline-block">
                            Copyright © 
                            <a href="https://www.bootstrapdash.com/" target="_blank">bootstrapdash.com </a>
                            2021
                          </span>
                          <span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center">
                            Only the best <a href="https://www.bootstrapdash.com/" target="_blank"> Bootstrap dashboard  </a> 
                            templates
                          </span>
                        </div>
                    </footer>
                </div>
            </div>
        </div>
    <!-- plugins:js -->
    <script src="/static/vendors/base/vendor.bundle.base.js"></script>
    <!-- endinject -->
    <!-- Plugin js for this page-->
    <script src="/static/vendors/chart.js/Chart.min.js"></script>
    <script src="/static/vendors/datatables.net/jquery.dataTables.js"></script>
    <script src="/static/vendors/datatables.net-bs4/dataTables.bootstrap4.js"></script>
    <!-- End plugin js for this page-->
    <!-- inject:js -->
    <script src="/static/js/off-canvas.js"></script>
    <script src="/static/js/hoverable-collapse.js"></script>
    <script src="/static/js/template.js"></script>
    <!-- endinject -->
    <!-- Custom js for this page-->
    <script src="/static/js/dashboard.js"></script>
    <script src="/static/js/data-table.js"></script>
    <script src="/static/js/jquery.dataTables.js"></script>
    <script src="/static/js/dataTables.bootstrap4.js"></script>
    <script src="/static/js/file-upload.js"></script>
    <script>
      function checkedOrNot(checkbox){
          var btn = document.getElementById("ConfirmBtn");
          var choice = checkbox.checked;
          if (choice){
              btn.removeAttribute("disabled");
          }
          else{
              btn.setAttribute('disabled', true);
          }
      }
    </script>
    <!-- End custom js for this page-->

    <script src="/static/js/jquery.cookie.js" type="text/javascript"></script>
    </body>
</html>